#!/bin/sh

echo "% 弘坤家族办公室" >index.md
echo "" >>index.md
counter=0

for files in `ls -r ???.*.md`
do
	((counter=counter+1))
	docname=${files:0:${#files}-3}

	echo "[$docname]($docname.html)" >>index.md

	echo $docname 
	echo "" >>index.md
	pandoc -s $docname.md -o ~/workshop/hbaolong.github.io/hkfo/$docname.html
done

pandoc -s index.md -o ~/workshop/hbaolong.github.io/hkfo/index.html
